package ObjectDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-10-17
 * Time: 14:55
 */
//默认是继承了父类Object,可以省略不写
class Demo /*extends Object*/{

}
public class Test1 {
    public static void main(String[] args) {
        /*Demo demo = new Demo();//实例化一个对象
        System.out.println("不加toString方法:"+demo);
        System.out.println("加toString方法:"+demo.toString());*/

        String s = "abc";
        StringBuilder stringBuilder = new StringBuilder("abc");
        System.out.println(s.equals(stringBuilder));
        System.out.println(stringBuilder.equals(s));
    }
}
